<html>
<head><meta charset="utf-8"><title>issue #76193 · project-inline-asm · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/index.html">project-inline-asm</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/issue.20.2376193.html">issue #76193</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="213969115"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/issue%20%2376193/near/213969115" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/issue.20.2376193.html#213969115">(Oct 20 2020 at 19:35)</a>:</h4>
<p>Is issue <a href="https://github.com/rust-lang/rust/issues/76193">#76193</a> a bug with rustc? If not, I'm going to close it and direct the user to stack overflow or the users forum, but I want to make sure it's not a bug first.</p>



<a name="213975014"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/issue%20%2376193/near/213975014" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/issue.20.2376193.html#213975014">(Oct 20 2020 at 20:26)</a>:</h4>
<p>Usage error, the stack pointer is moved when leaving the llvm_asm block. That's UB, I believe.</p>



<a name="213975026"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/issue%20%2376193/near/213975026" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Julian-Wollersberger <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/issue.20.2376193.html#213975026">(Oct 20 2020 at 20:26)</a>:</h4>
<p>As I understand it, the assembly "call" makes a new stack frame, but never removes that stack frame before exiting the assembly block, so the returning rust function will do something wrong.</p>



<a name="213975059"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/issue%20%2376193/near/213975059" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Julian-Wollersberger <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/issue.20.2376193.html#213975059">(Oct 20 2020 at 20:27)</a>:</h4>
<p>So yeah, usage error</p>



<a name="213975312"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/issue%20%2376193/near/213975312" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/issue.20.2376193.html#213975312">(Oct 20 2020 at 20:29)</a>:</h4>
<p>Okay, thanks! Will repost your comments and direct them to the forums if they need more help</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>